import request from '@/utils/request'

// 获取员工概览
export function employeeOverview() {
    return request({
        url: `/v1/home/summarize`,
        method: 'GET'
    })
}

// 获取最近得访客数据
export function recentVisitor(params){
    return request({
        url: `/v1/home/week`,
        method:'GET',
        params
    })
}

// 获取统计数据
export function statistics(){
    return request({
        url: `/v1/home/data`,
        method:'GET'
    })
}

// 获取考试分数
export function examScoreRanking(params){
    return request({
        url: `/v1/home/examination`,
        method:'GET',
        params
    })
}

// 获取快捷入口
export function quickEntry(params){
    return request({
        url: `/v1/menu/quick`,
        method:'GET',
        params
    })
}

// 添加快捷入口
export function addQuickEntry(params){
    return request({
        url: `/v1/menu/quick`,
        method:'POST',
        params
    })
}

// 用户更改显示模式
export function quickReveal(params){
    return request({
        url: `/v1/menu/quick/reveal`,
        method:'PUT',
        params
    })
}

// 获取web菜单
export function webMenu(params){
    return request({
        url: `/v1/menu`,
        method:'GET',
        params
    })
}

// 获取用户的显示模式
export function getDisplayMode(params){
    return request({
        url: `/v1/menu/quick/reveal`,
        method:'GET',
        params
    })
}

// 点击添加最近访问
export function addQuickLately(params){
    return request({
        url: `/v1/menu/quick/lately`,
        method:'POST',
        params
    })
}

// 快捷入口删除
export function deleteQuickEntry(params) {
    return request({
      url: `/v1/menu/quick`,
      method: 'DELETE',
      params
    })
  }
